Microsoft Word (2002)
Note: The Visual Basic code used to produce a report in Microsoft Word or Excel will differ slightly from one version of Microsoft Word or Excel to another. The examples in this documentation were produced using Microsoft Word and Excel 2002.
Note: Please note that the code examples provided here are suggestions only: there are many other ways to code this report.
The EMu reporting facility provides a flexible mechanism for exporting information out of EMu in a wide variety of formats. Although most reports are developed using Crystal Reports, such reports are read-only and this could prove to be a limitation if what is required is a report that can be modified or completed by a user after it has been produced.
For these situations, EMu is designed to interface with Microsoft Word, as reports developed in Word are not read-only and can be modified by the end user as required. It is worth keeping in mind however that Microsoft Word is not a general purpose reporting tool and it does not have the same level of reporting sophistication as Crystal Reports.
In this section we demonstrate how to create a mail merge report in Microsoft Word. This report could be developed in Crystal with perhaps greater ease, however, unlike a Crystal report, the mail merge report we will produce in Word can be edited by the user who runs the report.
The following example builds a Microsoft Word mail merge report to generate a Loan Agreement form. The Loan Agreement document consists of three pieces of information from three different sources:
- Loan information: details of the loan itself, e.g. loan period.
- Party information: details of the person to whom the loan is made, e.g. name, address.
- Object information: details of objects being lent, e.g. object summary.